flatcar-network: Use upstream network and resolved Dracut modules - #129
Merged
Conversation
We mount it in the minimal initrd and it never gets unmounted, so it's simpler to assume it's there. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
It was only used by Equinix Metal (Packet), which has now gone. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
The bootengine copies had gone out of sync, and we can just install coreos-init's copies. We need to adjust KeepConfiguration for the initrd environment though. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This was accidentally omitted. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
I added these when Dracut stopped simply installing all of them, but on reflection, Calico and veth are irrelevant in the initrd. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Our IP parser has some shortcomings and systemd-network-generator can simply do this for us. Afterburn is being modified to emit an environment file with SYSTEMD_PROC_CMDLINE because the generator won't read the existing /etc/cmdline.d file that was consumed by Dracut. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Upstream have also added KubeVirt support here, but that hasn't been released yet. Bug: #117 Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Flatcar’s initrd networking flow to rely on upstream Dracut + systemd components (notably systemd-network-generator with an Afterburn-provided SYSTEMD_PROC_CMDLINE), while removing the bespoke ip= parsing and deduplicating network unit files that had drifted from upstream/coreos-init behavior.
Changes:
- Switch initrd networking from a custom
ip=parser + static.networkset to upstreamsystemd-network-generator, with Afterburn providingSYSTEMD_PROC_CMDLINEvia an environment file. - Remove various initrd units/config that assumed a
sysusr-usr.mountsystemd unit, aligning with/sysusrbeing mounted byminimal-init. - Clean up/realign Dracut module inclusion and installed network unit sources (drop local copies; install upstream copies; tweak
KeepConfigurationbehavior for initrd).
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| update-bootengine | Adjust Dracut module set: drop network from omit list and add flatcar-network. |
| dracut/53ignition/sysusr-usr-revdeps.conf | Remove sysusr cryptsetup revdeps drop-in. |
| dracut/53ignition/module-setup.sh | Stop installing flatcar-static-network.service and sysusr-usr cryptsetup drop-in. |
| dracut/53ignition/ignition-mount.service | Remove RequiresMountsFor=/sysusr/usr/ dependency. |
| dracut/53ignition/ignition-kargs.service | Remove RequiresMountsFor=/sysusr/usr/ (keep /oem/). |
| dracut/53ignition/ignition-fetch.service | Remove RequiresMountsFor=/sysusr/usr/ (keep /oem/). |
| dracut/53ignition/ignition-fetch-offline.service | Remove RequiresMountsFor=/sysusr/usr/ (keep /oem/). |
| dracut/53ignition/ignition-disks.service | Remove RequiresMountsFor=/sysusr/usr/. |
| dracut/53ignition/flatcar-static-network.service | Remove the legacy unit that generated .network files via coreos-metadata --network-units=.... |
| dracut/53ignition/flatcar-openstack-hostname.service | Drop sysusr-usr.mount ordering/requirement. |
| dracut/53ignition/flatcar-metadata-hostname.service | Drop sysusr-usr.mount ordering/requirement. |
| dracut/53ignition/flatcar-afterburn-network.service | Drop sysusr-usr.mount ordering/requirement. |
| dracut/50flatcar-network/zz-default.network | Remove local copy (intended to use upstream-installed copy). |
| dracut/50flatcar-network/yy-pxe.network | Remove local copy (intended to use upstream-installed copy). |
| dracut/50flatcar-network/yy-netroot.network | Tighten matching to exclude virtual NICs and loopback. |
| dracut/50flatcar-network/yy-azure-sriov.network | Remove local copy (intended to use upstream-installed copy). |
| dracut/50flatcar-network/yy-azure-sriov-coreos.network | Remove local copy (intended to use upstream-installed copy). |
| dracut/50flatcar-network/systemd-network-generator-afterburn.conf | Add drop-in to run Afterburn first and load /run/afterburn/network-generator.env for SYSTEMD_PROC_CMDLINE. |
| dracut/50flatcar-network/parse-ip-for-networkd.sh | Remove custom ip= parsing script. |
| dracut/50flatcar-network/parse-ip-for-networkd.service | Remove unit that ran the custom ip= parsing script. |
| dracut/50flatcar-network/module-setup.sh | Switch to upstream unit installation; adjust KeepConfiguration; wire Afterburn into systemd-network-generator; manage enable/disable of networkd/resolved/generator. |
| dracut/50flatcar-network/afterburn-network-kargs.service | Re-scope conditions and ordering (notably ProxmoxVE; order before dracut-cmdline.service); remove old install/PartOf wiring. |
| dracut/50flatcar-network/10-nodeps.conf | Remove the systemd-resolved drop-in. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tormath1
reviewed
Aug 27, 2026
tormath1
approved these changes
Aug 27, 2026
tormath1
left a comment
Contributor
There was a problem hiding this comment.
One question - but it looks good to me. It simplifies a lot this area. Thanks for the deep dive!
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our IP parser has some shortcomings and systemd-network-generator can simply do this for us. Afterburn is being modified (coreos/afterburn#1299) to emit an environment file with
SYSTEMD_PROC_CMDLINEbecause the generator won't read the existing /etc/cmdline.d file that was consumed by Dracut.This also deduplicates .network files in common with coreos-init. The bootengine copies had gone out of sync, and we can just install coreos-init's copies. We need to adjust
KeepConfigurationfor the initrd environment though.This partially addresses #117 by allowing afterburn-network-kargs.service to work with ProxmoxVE. We cannot allow KubeVirt yet because a new Afterburn release is needed first.
The rest is just small cleanups.
How to use
This is most effectively tested with ProxmoxVE. /run/systemd/networkd should include 20-eth0.network and 71-default.network generated from the two different mechanisms. They should be roughly similar.
Testing done
The most recent Jenkins build (now gone) was successful. Earlier builds tested all the platforms successfully. I have also done a lot of manual testing with QEMU and ProxmoxVE.